package cn.lj.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李津
 * @since 2021-04-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_user")
@ApiModel(value="User对象",description = "用户表")
public class User implements Serializable{

    private static final long serialVersionUID=1L;

      @ApiModelProperty(value = "用户 id")
      @TableId(value = "id", type = IdType.AUTO)
      @ExcelProperty(value = "用户ID")
      private Integer id;

      @ApiModelProperty(value = "用户名")
      @TableField(value = "user_name")
      @ExcelProperty(value = "用户名")
      private String userName;

      @ApiModelProperty(value = "登录名")
      @TableField(value = "login_name")
      @ExcelProperty(value = "登录名")
      private String loginName;

      @ApiModelProperty(value = "密码")
      @TableField(value = "password")
      @ExcelProperty(value = "密码")
      private String password;

      @ApiModelProperty(value = "1 为管理员用户，2 为普通用户")
      @TableField(value = "type")
      @ExcelProperty(value = "权限")
      private Integer type;

      @ApiModelProperty(value = "身份证号")
      @TableField(value = "id_no")
      @ExcelProperty(value = "身份证号")
      private String idNo;

      @ApiModelProperty(value = "手机号")
      @TableField(value = "phone_no")
      @ExcelProperty(value = "手机号")
      private String phoneNo;

      @ApiModelProperty(value = "用户人数")
      @TableField(exist = false)
      private Integer userCount;


}
